/*
 * File: ert_main.c
 *
 * Code generated for Simulink model 'VEWM'.
 *
 * Model version                  : 3.391
 * Simulink Coder version         : 9.4 (R2020b) 29-Jul-2020
 * C/C++ source code generated on : Wed Feb 28 13:55:32 2024
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: NXP->Cortex-M4
 * Code generation objective: MISRA C:2012 guidelines
 * Validation result: Not run
 */

#include <stdio.h>              /* This ert_main.c example uses printf/fflush */
#include "VEWM.h"                      /* Model's header file */
#include "rtwtypes.h"
#include "stddef.h"

/* Includes for objects with custom storage classes. */
#include "VEWM.h"
#include "RTE.h"
#include "PrjCfg.h"

/* Exported data declaration */

/* Declaration for custom storage class: ImportFromFile */
extern uint8_T fltm_enum_SelfChkSts;   /* '<Root>/fltm_enum_SelfChkSts' */
extern uint8_T fltm_enum_ThermRunaway; /* '<Root>/fltm_enum_ThermRunaway' */
extern uint8_T fltm_enum_adhChkSts;    /* '<Root>/fltm_enum_adhChkSts' */
extern uint8_T fltm_enum_hvilFlt;      /* '<Root>/fltm_enum_hvilFlt' */
extern uint8_T fltm_enum_negRlyAd;     /* '<Root>/fltm_enum_negRlyAd' */
extern uint8_T fltm_flg_ChgPwrDownFlt; /* '<Root>/fltm_flg_ChgPwrDownFlt' */
extern uint8_T fltm_flg_DsgPwrDownFlt; /* '<Root>/fltm_flg_DsgPwrDownFlt' */
extern boolean_T fltm_flg_hvilFlt;     /* '<Root>/fltm_flg_hvilFlt' */
extern uint16_T soce_pct_SOC;          /* '<Root>/soce_pct_SOC' */
extern uint8_T tmsc_enum_HeatSts;      /* '<Root>/tmsc_enum_HeatSts' */

/* (热管理工作状态) */
extern uint8_T tmsc_flg_MaiRlyPwrOn;   /* '<Root>/tmsc_enum_MaiRlyPwrOn' */

/* (只加热模式充电继电器上电指令) */

/*
 * Example use case for call to exported function:
 * TASK_VEWM
 */
extern void sample_usage_TASK_VEWM(void);
void sample_usage_TASK_VEWM(void)
{
    /*
     * Set task inputs here:
     */

    /*
     * Call to exported function
     */
    TASK_VEWM();

    /*
     * Read function outputs here
     */
}

/*
 * The example "main" function illustrates what is required by your
 * application code to initialize, execute, and terminate the generated code.
 * Attaching exported functions to a real-time clock is target specific.
 * This example illustrates how you do this relative to initializing the model.
 */
int_T main(int_T argc, const char *argv[])
{
    /* Unused arguments */
    (void)(argc);
    (void)(argv);

    /* Initialize model */
    VEWM_initialize();

    /* First time initialization of system output variables.
     * Constant and invariant outputs will not be updated
     * after this step.
     */
    while (rtmGetErrorStatus(VEWM_M) == (NULL))
    {
        /*  Perform application tasks here. */
    }

    return 0;
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
